A variety of apparatuses are linked to each other via a network. The network includes at least one relay apparatus. The relay apparatus transfers received data to a destination apparatus. The network is used for communications of various users and services. The relay apparatus identifies each piece of traffic occurring in communications of users and services by a unit called a flow in accordance with a specific identifier attached to the data.
Multiple flows occur over the network, and there is a limitation on a band of a line of the network. If an amount of flowing data exceeds the band of the line, resulting congestion may delay communications. The relay apparatus may thus perform quality of service (QoS) such as policing or shaping.
Policing is a technique of discarding data in excess if a transfer rate of data exceeds an upper rate. Shaping is a technique of storing data in excess onto a buffer if a transfer rate of data exceeds an upper rate, and then outputting the data in excess after a specific period of time has elapsed. Using these techniques, the transfer rate of the data is guaranteed on a per flow basis.
In the shaping, scheduling is performed in order to output the data stored on the buffer later. For example, in one disclosed technique, an input packet is stored on a buffer, and then the output end time of the input packet is calculated beforehand in accordance with the length of the input packet on each flow, and a packet output interval defining a preceding packet output end time and a desired transmission rate. By outputting the input packet at the calculated output end time from the buffer, even a variable length packet may be output at a desired transmission rate on a per flow basis.
In another disclosed technique, a unit to discard data rather than storing the data onto a buffer is used on a per connection basis. Multiple connections are stored on the same buffer while a minimum band is ensured for each connection.
As described above, the shaping employs a buffer to temporarily store data exceeding a limitation rate. For example, it is contemplated that multiple buffers that may store data of multiple flows are arranged and that scheduled data is then distributed among the buffers. The buffer as a target to be read is successively switched at specific time intervals, and data stored on the buffers is then successively output. An amount of data that may be stored on a single buffer on a per flow basis is limited by the transfer rate of each flow. More specifically, it is contemplated that a relatively larger amount of data is permitted to be stored in a flow having a relatively higher transfer rate, and that a relatively smaller amount of data is permitted to be stored in a flow having a relatively lower transfer rate.
A buffer capacity of a flow having a relatively low transfer rate is smaller than a buffer capacity of a flow having a relatively higher transfer rate. If a buffer capacity is insufficient to perform scheduling, data will be discarded. On the other hand, a memory size of multiple buffers is limited. Given a limited memory size, the challenge is to increase a buffer capacity of a flow having a relatively low transfer rate.
The techniques described above are disclosed in Japanese Laid-open Patent Publication Nos. 2006-197235 and 11-112527.